/*
 *  Copyright 2022 Collate.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  http://www.apache.org/licenses/LICENSE-2.0
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

@import (reference) '../variables.less';

.versions-list-container {
  position: fixed;
  top: @om-navbar-height;

  .ant-drawer-content-wrapper {
    box-shadow: none;
    border-left: 1px solid @border-color;
  }

  .ant-drawer-body {
    padding: 16px;
  }

  .ant-drawer-header {
    padding: 16px;
    padding-bottom: 0px;
  }

  .ant-drawer-title {
    font-size: 14px;
  }
}

.timeline-drawer {
  height: 100%;
  background: @white;
  position: fixed;
  display: none;
  top: 64px;
  right: 0;
  width: 330px;
  overflow-y: auto;
  padding: 16px;
  border-left: @global-border;
  transition: display 0.3s ease-out;
}
.timeline-drawer.open {
  display: block;
}

.timeline-content {
  display: flex;

  &.limit-reached {
    opacity: 0.5;

    cursor: not-allowed;
  }
}
.timeline-wrapper {
  padding-right: 1rem;
}
.timeline-rounder {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid @primary-1;
  background: transparent;
  border-radius: 50%;
  margin-top: 0.15rem;
}
.timeline-rounder.major,
.timeline-rounder.major.selected {
  border-color: #f9816c;
}
.timeline-rounder.selected {
  border: 3px solid @primary-color;
}

.timeline-rounder.selected::after {
  content: '';
  display: block;
  margin: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid @primary-color;
  background-color: @primary-color;
}
.timeline-rounder.major.selected::after {
  border-color: #f9816c;
  background-color: #f9816c;
}

.timeline-line {
  display: block;
  width: 2px;
  height: 100%;
  background-color: @primary-1;
  transform: translate(8px, 0);
}
.timeline-line.major {
  height: 98%;
}
.timeline-line-se {
  display: block;
  width: 2px;
  height: 15px;
  background-color: @primary-1;
  transform: translate(8px, 0);
}

.version-timestamp::before {
  content: '\2022';
  margin-right: 6px;
  margin-left: 4px;
}
